package sctu.edu.java.year2016.team01.zhuming.day20160523.chapter5_3;

/**
 * Created by Administrator on 2016/5/24.
 */
import java.util.Scanner;
public class QiuShuZuHe {
    public static void main(String[] args){

        Scanner scan=new Scanner(System.in);
        int[][] arr=new int[2][2];
        System.out.println("请输入一个2行2列的数组：");

            int i,j,cet;
           for(i=0;i<arr.length;i++)
            for (j = 0; j < arr[i].length; j++)
            {
                arr[i][j] = scan.nextInt();
            }
        int sum=0;
        for(i=0;i<arr.length;i++)
            for (j = 0; j < arr[i].length; j++){

                sum+=arr[i][j];
            }
            System.out.println(" "+sum);

    }
}



